Skip to content

)} ,System.Func{-0,--1})}

LiveQuery.GroupBy(Func) method

Defined in

Type: LiveQuery Namespace: ReactiveList.Reactive.Queries Assembly: ReactiveList.Reactive.dll

Applies to

net11.0, net10.0, net47, net471, net472, net48, net481

Overloads

  1. public GroupedLiveQuery<TKey, T> GroupBy<TKey>(Func<T, TKey> keySelector) where TKey : notnull

  2. public GroupedLiveQuery<TKey, TElement> GroupBy<TKey, TElement>(Func<T, TKey> keySelector, Func<T, TElement> elementSelector) where TKey : notnull where TElement : notnull

1. Overload

public GroupedLiveQuery<TKey, T> GroupBy<TKey>(Func<T, TKey> keySelector) where TKey : notnull

View source (opens in a new tab)

Summary: Groups the items by a key.

Type parameters

NameDescription
TKeyThe grouping key type.

Parameters

NameTypeDescription
keySelectorFunc (opens in a new tab)Takes the grouping key from an item.

Returns: GroupedLiveQuery -- The grouped query.

2. Overload

public GroupedLiveQuery<TKey, TElement> GroupBy<TKey, TElement>(Func<T, TKey> keySelector, Func<T, TElement> elementSelector) where TKey : notnull where TElement : notnull

View source (opens in a new tab)

Summary: Groups the items by a key and holds a value taken from each item in the groups.

Type parameters

NameDescription
TKeyThe grouping key type.
TElementThe type of the values the groups hold.

Parameters

NameTypeDescription
keySelectorFunc (opens in a new tab)Takes the grouping key from an item.
elementSelectorFunc (opens in a new tab)Takes the value a group holds from an item.

Returns: GroupedLiveQuery -- The grouped query.